package com.xueshandai.db.migration.mode.config;

import com.alibaba.fastjson.JSON;

import java.util.List;

/**
 * Created by dengzt on 2015/1/6.
 */
public class TableMap {

    private String oldTableName;
    private String newTableName;

    private List<FieldMap> fieldMapList;

    public String getOldTableName() {
        return oldTableName;
    }

    public void setOldTableName(String oldTableName) {
        this.oldTableName = oldTableName;
    }

    public String getNewTableName() {
        return newTableName;
    }

    public void setNewTableName(String newTableName) {
        this.newTableName = newTableName;
    }

    public List<FieldMap> getFieldMapList() {
        return fieldMapList;
    }

    public void setFieldMapList(List<FieldMap> fieldMapList) {
        this.fieldMapList = fieldMapList;
    }

    public String toJSON() {
        return JSON.toJSONString(this);
    }

    public static TableMap parse(String json) {
        return JSON.parseObject(json, TableMap.class);
    }

}
